var user ={
  username:'admin',
  password:'123456',
  isUsed:true
}
console.log(user.password);
for (var key in user ) {
  console.log(key)
}
var users =[
  {
    username:'admin',
    password: '123456',
  },
  {
    username:'test',
    password: '123456',
  },
  {
    username:'admin',
    password: 'admin',
  }
]
/*
console.log(user);
console.log(user[1].password);
for (var i=0;i<user.length;i++){
  console.log(user[i].username)
}*/
/*for (var key in user){
  console.log(key);
  console.log(user[key].password)
}*/
/*数据过滤*/
var current = users.find(function (user) {
    return user.username=='test';
})
console.log(current);
var finds = users.filter(function(user){
  return user.password=='123456';
})
console.log(finds)
